<template>
  <van-nav-bar fixed title="详情" left-text="返回" left-arrow @click-left="() => { $router.back() }" />
  <div style="height: 45px;"></div>
  <div v-html="detailData.goods_introduce"></div>
  <van-action-bar>
    <van-action-bar-icon icon="chat-o" text="客服" @click="onClickIcon" />
    <van-action-bar-icon icon="cart-o" text="购物车" @click="onClickIcon" />
    <van-action-bar-icon icon="shop-o" text="店铺" @click="onClickIcon" />
    <van-action-bar-button type="danger" text="查看物流" @click="go" />
  </van-action-bar>
</template>

<script setup>
import { ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { detailApi } from '@/api/api'
const route = useRoute()
const router = useRouter()
console.log(route.params.goods_id)
let detailData = ref([])
detailApi(route.params.goods_id).then(res => {
  console.log('订单详情', res)
  detailData.value = res.data.message
})
const go = () => {
  router.push({ path: '/address' })
}
</script>

<style lang="scss" scoped></style>